← Back to issue list

Hooks stanza doesn't match parts and apps

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1877448
Type
issue
State
open
Author
~ted
Labels
Created
2020-05-07 20:04:21.437224+00:00
Updated
2020-06-20 14:53:50.744568+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

Working on adding some font hooks for the Inkscape package it was my first time using hooks, and I found it kinda confusing. I think this largely stemmed from the fact that the hooks section works differently than the parts and apps sections. The hooks section is abstractly like this: hooks.$trigger.$parameter Where apps and parts are mostly like this: apps.$name.$parameter I think that the $name attribute is useful for organization and allows for more flexible hooks. For instance I'd suggest what is now: hooks:   configure:     plugs: [ desktop ] Would look more like this: hooks:   update-font-cache:     trigger: [ configure ]     command: update-font-cache.sh     plugs: [ desktop ] This would allow for better organization and documentation of hooks. Of course this would require some translation as snapd expects the original format. But that could be achieved with Snapcraft building a shell script for each trigger calling the appropriate hooks.

Evaluation history

No evaluation history available.